package com.mxpio.erp.common.technology.entity;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.jpa.policy.impl.UUIDPolicy;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;


@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_TECHNOLOGY_BOM_LINE_AUDIT")
@Schema(description="Bom_line_audit")
public class BomInfoLineAudit extends BaseEntity {

	private static final long serialVersionUID = 1L;

	@Id
	@Column(name = "BOM_LINE_ID_", updatable = false)
	@Generator(policy = UUIDPolicy.class)
	@Schema(description = "BomLine主键")
	private String bomLineId;
	
	
	@Column(name = "BOM_ID_", updatable = false)
	@Schema(description = "Bom主键")
	private String bomId;
	
	@Column(name = "LINE_NO_", updatable = false)
	@Schema(description = "行号")
	private String lineNo;

	@Column(name = "TMP_CRUD_TYPE_")
	@Schema(description = "数据状态")
	private String tmpCrudType;
	
	@Column(name = "ITEM_CODE_")
	@Schema(description = "子项物料编号")
	private String itemCode;

	@Column(name = "ITEM_NAME_")
	@Schema(description = "子项物料名称")
	private String itemName ;

	@Column(name = "ITEM_SPEC_")
	@Schema(description = "子项物料规格型号")
	private String itemSpec;

	@Column(name = "ITEM_GROUP_")
	@Schema(description = "子项物料组")
	@Dict(dicCode="groupCode", dicEntity = ItemGroup.class, dicText = "groupName")
	private String itemProp;

	@Column(name = "ITEM_CONSUMPTION_")
	@Schema(description = "子项物料基本用量")
	private String itemConsumption;

	@Column(name = "BEGIN_TIME_")
	@Schema(description = "生效日期")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date beginTime;
	
	@Column(name = "END_TIME_")
	@Schema(description = "失效日期")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date endTime;

	@Column(name = "WASTAGE_")
	@Schema(description = "损耗率")
	private BigDecimal wastage;
	
	@Column(name = "MAKE_LENGTH_")
	@Schema(description = "下料长度")
	private BigDecimal makeLength;
	
	@Column(name = "MAKE_AREA_")
	@Schema(description = "下料面积")
	private BigDecimal makeArea;
	
	@Column(name = "MAKE_NUM_")
	@Schema(description = "可制数量")
	private BigDecimal makeNum;

	@Column(name = "MATERIAL_")
	@Schema(description = "是否材料")
	@Dict(dicCode = "ERP_COMMON_YESNO")
	private String material;
}
